{{template "blog/header.html" .}}

<div id="postsContainer">
	<div class="container">
		{{if .notebookId}}
		<h2>{{msg . "blogClass"}} - {{.notebook.Title}}</h2>
		{{end}}
	</div>
	<div id="posts">
		{{$G := .}}
		{{range .blogs}}
		<div class="each-post">
			<div class="title">
				<a href="{{$.viewUrl}}/{{.NoteId.Hex}}" title="{{msg $ "fullBlog"}}">
					{{.Title}}
				</a>
			</div>
			<div class="created-time">
				<i class="fa fa-bookmark-o"></i>
				{{if .Tags}} 
					{{blogTags $ .Tags}}
				{{else}}
					{{msg $ "noTag"}}
				{{end}}
				|
				<i class="fa fa-calendar"></i> {{msg $ "updatedTime"}} {{.UpdatedTime | datetime}} | 
				<i class="fa fa-calendar"></i> {{msg $ "createdTime"}} {{.CreatedTime | datetime}}
			</div>
			<div class="desc">
				{{.Content | raw}}
			</div>
			<a class="more" href="{{$.viewUrl}}/{{.NoteId.Hex}}" title="{{msg $ "fullBlog"}}">{{msg $ "more"}}.</a>
		</div>
		{{end}}
		<!-- 分页 -->
		<ul class="pager">
			{{if .notebookId}}
				{{set $ "pageUrl" (concatStr $.cateUrl "/" .notebookId)}}
			{{else}}
				{{set $ "pageUrl" $.indexUrl}}
			{{end}}
			{{page $.pageUrl .page .pageSize .count}}
		</ul>
	</div>
</div>

{{template "blog/footer.html" .}}
{{template "blog/highlight.html"}}
</body>
</html>